package cn.itsource.autoconfigure;

import cn.itsource.common.SendMsg_webchinese;
import cn.itsource.common.TxCos;
import cn.itsource.config.CosProperties;
import cn.itsource.common.MyCosClient;
import org.springframework.boot.context.properties.EnableConfigurationProperties;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

@Configuration
@EnableConfigurationProperties({CosProperties.class})
public class CosAutoConfiguration {
    @Bean
    public TxCos getTxCos(CosProperties cosProperties, MyCosClient myCosClient){
        return new TxCos(cosProperties, myCosClient.getCosClient());
    }

    @Bean
    public MyCosClient getMyCosClient(CosProperties cosProperties){
        return new MyCosClient(cosProperties);
    }

    @Bean
    public SendMsg_webchinese getSMSTemplate(){
        return new SendMsg_webchinese();
    }

}
